<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:include href='../xsl.include.main.xsl'/>

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="blog">

<form name="blogWrite" method="post" action="">
<div class="bleachBox">
	Aggiungi un tuo <b>commento</b> al blog: <span class="blogAuthor"><xsl:value-of select="/blog/segment/@title"/></span>
	<p/>autore: <span class="blogAuthor"><xsl:value-of select="@nick"/></span> - <span class="blogAuthor"><xsl:value-of select="@fulldate"/></span>
	<br/>
	<TEXTAREA id="blogComment" name="blogComment" rows="10" cols="70" style="margin-top:10px;width:90%;" WRAP="SOFT" class="blogBody"><xsl:value-of select="@blogComment"/>
	</TEXTAREA>
	<br/>
	<span style="font-size:8pt;"><b>Non sono consentiti tag <a tabindex="-1" target="_new" style="color:black;" href="http://it.wikipedia.org/wiki/Html">html</a></b>, solo puro testo <a tabindex="-1" target="_new" style="color:black;" href="http://it.wikipedia.org/wiki/ASCII">ASCII.</a></span>
	<div style="width:100%; padding-left:10px;">
		<xsl:choose>
			<xsl:when test='@is2bnotified = "E" or @is2bnotified = "P"'>
				<input 
					onClick="javascript:document.getElementById('EMAIL').disabled = document.getElementById('NOTIFYME').checked ? false : true; document.getElementById('PVT').disabled = document.getElementById('NOTIFYME').checked ? false : true;" 
					style="padding-top:2px;" type="checkbox" name="NOTIFYME" id="NOTIFYME" checked="on"><span class="body" style="padding:2px 0px 4px 2px;">
				<b>Continua</b> a tenermi aggiornato su quello che succede a questo blog
				</span></input>
			</xsl:when>
			<xsl:otherwise>
				<input 
					onClick="javascript:document.getElementById('EMAIL').disabled = document.getElementById('NOTIFYME').checked ? false : true; document.getElementById('PVT').disabled = document.getElementById('NOTIFYME').checked ? false : true;" 
					style="padding-top:2px;" type="checkbox" name="NOTIFYME" id="NOTIFYME"><span class="body" style="padding:2px 0px 4px 2px;">
				Tienimi aggiornato su quello che succede a questo blog
				</span></input>
			</xsl:otherwise>
		</xsl:choose>
		<div style="padding-left:20px;padding-top:4px;">
			<xsl:choose>
				<xsl:when test='@is2bnotified = "P"'>
					<input type="radio" value="EMAIL" name="CHANNEL" id="EMAIL">con una <b>email</b></input>
					<br/>
					<input type="radio" checked="yes" value="PVT" name="CHANNEL" id="PVT">con un messaggio sul sito</input>
				</xsl:when>
				<xsl:when test='@is2bnotified = "E"'>
					<input type="radio" checked="yes" value="EMAIL" name="CHANNEL" id="EMAIL">con una <b>email</b></input>
					<br/>
					<input type="radio" value="PVT" name="CHANNEL" id="PVT">con un messaggio sul sito</input>
				</xsl:when>
				<xsl:otherwise>
					<input type="radio" checked="yes" value="EMAIL" name="CHANNEL" id="EMAIL" disabled="true">con una <b>email</b></input>
					<br/>
					<input type="radio" value="PVT" name="CHANNEL" id="PVT" disabled="true">con un messaggio sul sito</input>
				</xsl:otherwise>
			</xsl:choose>
		</div>
	</div>
	<input type="hidden" name="blogDate" value="{@sqldate}"></input>
	<input type="hidden" name="FORM_ID" value="postBlogComment"></input>
	<p/><input type="submit" name="blogSubmit" value="Aggiungi il commento"></input><br/>
</div>
</form>

<xsl:if test="@errorString!=''">
	<script> alert("<xsl:value-of select="@errorString"/>");</script>
</xsl:if>

</xsl:template>

<xsl:template match="segment[@public=1]">

<div><img src="/imgs/spacer.gif" height="20px"/></div>
	
<div style="
	float: right;
	margin-bottom: 1px;
	margin-top: 4px;
	padding-right: 6px;
">
<xsl:call-template name="weekDayLongIta">
	<xsl:with-param name="dw" select="@dw"/>
</xsl:call-template>,&#160;<xsl:value-of select="substring(@date,9,2)"/>
&#160;<xsl:call-template name="monthNameIta">
	<xsl:with-param name="month" select="substring(@date,6,2)"/>
</xsl:call-template>
&#160;<xsl:value-of select="substring(@date,1,4)"/>,&#160;<xsl:value-of select="substring(@date,12,8)"/>
</div>
<div class="blogAuthor" style="
	background: #E9E9E9;
	border: 1px dotted #666666;
	color: #000000;
	margin-bottom: 6px;
	padding-bottom: 1px;
	padding-left: 4px;
	padding-right: 2px;
"><xsl:value-of select="@title"/>!!</div>

<div class="blogBody" style="
	color: #000000;
	margin-bottom: 6px;
	padding-bottom: 1px;
	padding-left: 14px;
	padding-right: 12px;
"><xsl:value-of select="@body" disable-output-escaping='yes'/></div>


</xsl:template>

</xsl:stylesheet>